<?php

namespace Resources\Form;

use Zend\Form\Form;

class SpeakerForm extends Form {
    public function __construct($name = null)
    {
        parent::__construct('register');
        $this->setAttribute('method', 'post');
        $this->setAttribute('class', 'form-horizontal');
        $this->setInputFilter(new SpeakerFormFilter());
    
        $this->add(array(
            'name' => 'ID',
            'type' => 'Hidden',
            array(
                'default' => '0'
            )
        ));
        
        $this->add(array(
            'name' => 'TITLE',
            'options' => array(
                'label' => 'Title :'
            ),
            'type' => 'Zend\Form\Element\Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:125px',
                'options' => array(
                    '0' => '--select--',
                    '1' => 'Rev',
                    '2' => 'Ps',
                    '3' => 'Mr',
                    '4' => 'Mrs',
                    '5' => 'Miss',
                    '6' => 'Dr',
                    '7' => 'Prof',
                    '8' => 'Other'
                )
            ),
            'required' => true
        ));
    
        $this->add(array(
            'name' => 'FIRST_NAME',
            'options' => array(
                'label' => 'First Name'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control'
            )
        ));
        
        $this->add(array(
            'name' => 'MIDDLE_NAME',
            'options' => array(
                'label' => 'Middle Name'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control'
            )
        ));
        
        $this->add(array(
            'name' => 'LAST_NAME',
            'options' => array(
                'label' => 'Last Name'
            ),
            'type' => 'Text',
            'attributes' => array(
                'class' => 'form-control'
            )
        ));
    
    
        $this->add(array(
            'name' => 'GENDER',
            'options' => array(
                'label' => 'Gender'
            ),
            'type' => 'Select',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'width:15em',
                'multiple', true,
                'options' => array(
                    '0' => '--select--',
                    '1' => 'Male',
                    '2'=> 'Female'
                )
            )
        ));
    
      
        $this->add(array(
            'name' => 'REMARK',
            'options' => array(
                'label' => 'Remark ',
        
            ),
            'type' => 'Textarea',
            'attributes' => array(
                'class' => 'form-control',
                'style' => 'resize: none'
            )
        ));
        
    
        $this->add(array(
            'name' => 'BTNSAVE',
            'options' => array(
                'label' => ''
            ),
            'attributes' => array(
                'value' => 'Save',
                'class' => 'btn btn-default'
            ),
            'type' => 'submit',
            'id' => 'submitbutton'
        ));
    
        $this->add(array(
            'name' => 'BTNCLEAR',
            'options' => array(
                'label' => ''
            ),
            'attributes' => array(
                'value' => 'Clear',
                'class' => 'btn btn-default'
            ),
            'type' => 'submit',
            'id' => 'submitbutton'
        ));
    
        // We could also define the input filter here, or
        // lazy-create it in the getInputFilter() method.
    }
}